<?
	if ( get_field('flex_height') )
	{
		$height=get_field('flex_height');
	}else{
	$height=720;
	}
	echo '<a id="viewerPlaceHolder" style="width:505px;height:'.$height.'px;display:block"></a>';
?>

<?php
$viewer= "'".get_bloginfo('stylesheet_directory')."/inc/flex/FlexPaperViewer'";
				$swf= "'". get_field('flex_file')."'";
				?>
<script type="text/javascript"> 
	var fp = new FlexPaperViewer(	
	<?echo $viewer;?>,
	'viewerPlaceHolder', { config : {
		SwfFile : <? echo $swf;?>,
		Scale : 0.6, 
		ZoomTransition : 'easeOut',
		ZoomTime : 0.5,
		ZoomInterval : 0.2,
		FitPageOnLoad : false,
		FitWidthOnLoad : true,
		FullScreenAsMaxWindow : false,
		ProgressiveLoading : false,
		MinZoomSize : 0.2,
		MaxZoomSize : 5,
		SearchMatchAll : false,
		InitViewMode : 'SinglePage',
						 
		ViewModeToolsVisible : false,
		ZoomToolsVisible : true,
		NavToolsVisible : true,
		CursorToolsVisible : true,
		SearchToolsVisible : false,
  						
		localeChain: 'zh_CN'
	}});
</script>
